package com.hmall.mapper;

import com.hmall.model.MallOrder;
import com.hmall.model.MallPaymentVoucher;
import com.hmall.model.MallProductPlanItem;
import com.hmall.util.MyMapper;
import com.hmall.vo.MallPaymentVoucherVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface MallPaymentVoucherMapper extends MyMapper<MallPaymentVoucher> {
    MallPaymentVoucher selectByOrderNo(@Param("order_no") Long order_no);

    List<MallPaymentVoucher> selectExceptDeposit();

    List<MallPaymentVoucher> selectByMonth(@Param("dealer_id") Integer dealer_id,@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<MallPaymentVoucher> selectByUserIdAndMonth(@Param("user_id") int user_id,@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<MallPaymentVoucher> selectByUserId(@Param("user_id") Integer user_id);

    List<MallPaymentVoucherVo> selectByCustomerId(@Param("customer_id") Integer customer_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    Integer selectByDeptIdAndTime(@Param("dept_id") Integer dept_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    Integer selectByTime(@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    Integer selectUnExamVoucher(@Param("customerId") Integer customerId);
}